package persistence.utilisateur;

import java.awt.List;
import java.io.Serializable;
import java.util.ArrayList;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import persistence.offre.OffreDeProduit;

@Entity
@Table(name = "FOURNISSEUR")
public class Fournisseur extends Utilisateur implements Serializable {
	
	private int id;
	
	private String societe;
	
	private String numRue;
	
	private String nomRue;
	
	private String CP;
	
	private String ville;
	
	private String telephone;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="FOURNISSEUR_ID")
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="MAIL", length=80, nullable=false)
	public String getMail() {
		return mail;
	}

	public void setMail(String mail) {
		this.mail = mail;
	}

	@Column(name="PASS", length=80, nullable=false) 
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(name="NUMRUE", length=80, nullable=false)
	public String getNumRue() {
		return numRue;
	}

	public void setNumRue(String numRue) {
		this.numRue = numRue;
	}
	
	@Column(name="NOMRUE", length=80, nullable=false)
	public String getNomRue() {
		return nomRue;
	}

	public void setNomRue(String nomRue) {
		this.nomRue = nomRue;
	}

	@Column(name="CP", nullable=false)
	public String getCP() {
		return CP;
	}

	public void setCP(String CP) {
		this.CP = CP;
	}

	@Column(name="VILLE", length=80, nullable=false)
	public String getVille() {
		return ville;
	}

	public void setVille(String ville) {
		this.ville = ville;
	}

	@Column(name="TELEPHONE", length=20, nullable=false)
	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	@Column(name="SOCIETE", length=80, nullable=false)
	public String getSociete()
	{
		return this.societe;
	}
	
	private void setSociete(String societe)
	{
		this.societe = societe;
	}

	// CONSTRUCTEUR OBLIGATOIRE
	public Fournisseur()
	{
	}
	
	@Override
	public String affichage()
	{
		return "Bienvenue société "+this.societe;
	}
}
